home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / m68k / 402 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.4 KB

  1. Path: ebcs46.ebc.ericsson.se!usenet
  2. From: Eric Raquette <eric.raquette@era.ericsson.se>
  3. Newsgroups: comp.sys.m68k
  4. Subject: Re: 68302 and AMD Flash programming
  5. Date: Fri, 15 Mar 1996 15:14:40 +0100
  6. Organization: Ericsson Radio Systems AB
  7. Message-ID: <31497B50.ABD322C@era.ericsson.se>
  8. References: <4ia6rk$ro0@news.connectnet.com>
  9. NNTP-Posting-Host: ebcw301.ebc.ericsson.se
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.4 sun4m)
  14.  
  15. Mike Saunders wrote:
  16. > I am trying to reprogram AMD Flash AMF010A in system with a Motorola
  17. > 68302 as the controller.  Does anyone have any hints on how to get
  18. > this done?
  19.  
  20. Something like this,it depends on the buswidth to the flash(this is 32bit).
  21. It copies a sector from dram/sram to flash,and can of course not be
  22. executed in the same flash as beeing programmed.
  23. This example has no error checking or recovery,use it only from a debugger.
  24.  
  25. COPY_TO_FLASH:  
  26.                 move.l  #$AAAAAAAA,$00015554
  27.                 move.l  #$55555555,$0000AAA8
  28.                 move.l  #$80808080,$00015554
  29.                 move.l  #$AAAAAAAA,$00015554
  30.                 move.l  #$55555555,$0000AAA8
  31.                 move.l  #$30303030,$00000000    ;SECTOR 0 START
  32.                 move.l  #$30303030,$00004000    ;SECTOR 1 START
  33.                 MOVE.L  #$FFFFFFFF,D0           
  34. CHECK_ERASE:
  35.                 CMP.L   ($00000000),D0
  36.                 BNE.B   CHECK_ERASE        ;all ones after erase is done
  37.  
  38.                 LEA.L   $00000000,A0            ;VECTOR 0 AT RESET,start of flash
  39.                 LEA.L   $fd000000,A1        ;this is where the code is stored
  40.                 MOVE.L  #$8000,D1               ;copy 128K BYTES
  41. COPY:            
  42.                 MOVE.L  (A1),D0
  43. WRITE_FLASH:
  44.                 move.l  #$AAAAAAAA,$00015554
  45.                 move.l  #$55555555,$0000AAA8
  46.                 move.l  #$A0A0A0A0,$00015554
  47.                 move.l  d0,(a0)
  48. CHECK_BYTE:
  49.                 cmp.l   (a0),d0
  50.                  
  51.                 bne.b   CHECK_BYTE
  52.  
  53.                 ADDA.L  #$4,A0
  54.                 ADDA.L  #$4,A1
  55.                 DBF     D1,COPY
  56. READY:
  57.  
  58.  
  59. -- 
  60. NA/ERA/BR/TR/MD Eric Raquette
  61. Ericsson Radio Systems AB
  62. S-131 89 Stockholm, Sweden
  63. Visit addr.   (Augustendalsvagen 21,Nacka Strand)
  64. Phone: +46 8 42 20641 Fax:   +46 8 42 21010
  65. email: Eric.Raquette@era.ericsson.se
  66. ---------------------------------------------------------
  67.